ThrowException Method (String, String, ConstraintViolationType)

CuttingEdge.Conditions

Throws an exception.

Namespace:  CuttingEdge.Conditions
Assembly:  CuttingEdge.Conditions (in CuttingEdge.Conditions.dll)

Syntax

Visual Basic (Declaration)
Public Sub ThrowException ( _
	condition As String, _
	additionalMessage As String, _
	type As ConstraintViolationType _
)
C#
public void ThrowException(
	string condition,
	string additionalMessage,
	ConstraintViolationType type
)
Visual C++
public:
void ThrowException(
	String^ condition, 
	String^ additionalMessage, 
	ConstraintViolationType type
)
JavaScript
function throwException(condition, additionalMessage, type);

Parameters

condition
Type: System..::.String
Describes the condition that doesn't hold, e.g., "Value should not be null".
additionalMessage
Type: System..::.String
An additional message that will be appended to the exception message, e.g. "The actual value is 3.". This value may be null or empty.
type
Type: CuttingEdge.Conditions..::.ConstraintViolationType
Gives extra information on the exception type that must be build. The actual implementation of the validator may ignore some or all values.

See Also